package org.dromara.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.dromara.business.domain.Coupon;
import org.dromara.business.domain.bo.CouponBo;
import org.dromara.business.domain.vo.CouponVo;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;

import java.util.Collection;
import java.util.List;

/**
 * 拼团优惠券Service接口
 *
 * @author zlj
 * @date 2025-04-27
 */
public interface CouponService extends IService<Coupon> {

    /**
     * 查询拼团优惠券
     */
    CouponVo queryById(Long couponId);

    /**
     * 查询拼团优惠券列表
     */
    TableDataInfo<CouponVo> queryPageList(CouponBo bo, PageQuery pageQuery);

    /**
     * 查询拼团优惠券列表
     */
    List<CouponVo> queryList(CouponBo bo);

    /**
     * 新增拼团优惠券
     */
    Boolean insertByBo(CouponBo bo);

    /**
     * 修改拼团优惠券
     */
    Boolean updateByBo(CouponBo bo);

    /**
     * 校验并批量删除拼团优惠券信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 领取优惠卷
     */
    boolean receive(Long configId);
}
